O que ela faz? como funciona? tem como postar foto ou video?
- Fórum
- OTServ
- Recursos
- Scripting
- Globalevents e Spells
- Nova Spell arrow repel para paladins
GU
tfs 0.3.6
Nova Spell arrow repel para paladins
Por gusinhi, 20 de mai. de 2016 em Globalevents e Spells
5
2.1k
22 de maio de 2016 às 20:02
info
Grupo: Campones
Registrado: 23/12/08
Posts: 41
Reputação: +4
Gênero: Masculino
Char no Tibia: Aura mage naruto

28 de maio de 2016 às 12:52
1 mês depois...
info
Grupo: Visconde
Registrado: 11/08/10
Posts: 477
Reputação: +175
Gênero: Masculino

28 de junho de 2016 às 07:57
A spell empurra o target pra trás, bacana !
info
Grupo: Administrador
Registrado: 08/07/05
Posts: 5.8k
Reputação: +1.4k
Gênero: Outro

28 de junho de 2016 às 12:33
Criativo. Adicione informações ao post @gusinhi, vai ficar legal e mais apresentável. ![]()
Reputado(s).





info
Grupo: Campones
Registrado: 23/12/08
Posts: 41
Reputação: +4
Gênero: Masculino
Char no Tibia: Aura mage naruto
local combat = Combat()
combat:setParameter(COMBAT_PARAM_TYPE, COMBAT_PHYSICALDAMAGE)
combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_HITAREA)
combat:setParameter(COMBAT_PARAM_DISTANCEEFFECT, CONST_ANI_ETHEREALSPEAR)
combat:setParameter(COMBAT_PARAM_BLOCKARMOR, 1)
function onGetFormulaValues(player, attack, factor)
local skillTotal = 2 * player:getEffectiveSkillLevel(SKILL_DISTANCE)
local levelTotal = player:getLevel() / 5
return -(((skillTotal + attack / 2500) * 0.5) + (levelTotal) + 7), -(((skillTotal + attack / 1875) * 0.75) + (levelTotal) + 13)
end
setCombatCallback(combat, CALLBACK_PARAM_SKILLVALUE, "onGetFormulaValues")
local function isWalkable(pos, creature, proj, pz)
if getTileThingByPos({x = pos.x, y = pos.y, z = pos.z, stackpos = 0}).itemid == 0 then return false end
if getTopCreature(pos).uid > 0 and creature then return false end
if getTileInfo(pos).protection and pz then return false, true end
local n = not proj and 3 or 2
for i = 0, 255 do
pos.stackpos = i
local tile = getTileThingByPos(pos)
if tile.itemid ~= 0 and not isCreature(tile.uid) then
if hasProperty(tile.uid, n) or hasProperty(tile.uid, 7) then
return false
end
end
end
return true
end
local function push(id, dir, t)
if t < 0 or not(isCreature(id)) then return true end
local pos = getPositionByDirection(getThingPos(id), dir)
if not(isWalkable(pos, true, false, true)) then
return true
end
doTeleportThing(id, pos, true)
addEvent(push, 0, id, dir, t-1)
end
local config = {
ammu = {2543,2544,2545,2546,2547,6529,7363,7364,7365,7838,7839,7840,7850},
pushBack = 2
}
function onCastSpell(cid, var)
local removed = false
for _, itemid in pairs(config.ammu) do
if getPlayerItemCount(cid, itemid) >= 1 then
doPlayerRemoveItem(cid, itemid, 1)
removed = true
end
if getPlayerSlotItem(cid, 5).itemid == 7438 or getPlayerSlotItem(cid, 6).itemid == 7438 then
removed = true
break
end
end
if not(removed) then return doPlayerSendCancel(cid, "You need ammunation for this spell.") and false end
local ret = doCombat(cid, combat, var)
if ret then
local dirTo = getDirectionTo(getThingPos(cid), getThingPos(variantToNumber(var)))
push(variantToNumber(var), dirTo, config.pushBack)
end
return ret
end